<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <link rel="stylesheet" href="css/news.css">
    <script src="jq/jquery-1.11.0.min.js"></script>
    <script src="js/template-web.js"></script>
    <script src="js/news.js"></script>

</head>

<body>
    <div id="news-list">

    </div>

    <!-- 定义模版 -->
    <script type="text/html" id="tpl-news">
        {{each data }}
        <div class="news-item">
            <img class="thumb" src="{{ 'http://www.liulongbin.top:3006'+$value.img}}" alt="" />
            <div class="right-box">
                <h1 class="title">{{$value.title}}</h1>
              
                <div class="tags">
                   {{each $value.tags}}
                    <span>{{$value}}</span>
                   {{/each}}
                </div>
              
                <div class="footer">
                    <div>
                        <span>{{$value.source}}</span>&nbsp;&nbsp;
                        <span>{{$value.time|filteName}}</span>
                    </div>
                    <span>评论人数:{{$value.cmtcount}}</span>
                </div>
            </div>
        </div>
        {{/each}}
    </script>

</body>

</html>